package com.wildish.core.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class DefaultController{
	private Integer ERROR_CODE_404 = 404;
	/**
	 * 默认拦截器
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String url = request.getRequestURI();
		System.out.println("未找到请求路径:" + url);
		response.sendError(ERROR_CODE_404);
		return null;
	}
}